#被动技能【弧光】
effect give @a[tag=daoshaolin] speed 1 0 true
execute as @a[tag=daoshaolin,scores={skCDPlayer=1..,skPlayer=0..60}] if data entity @s {SelectedItem:{id:"minecraft:diamond_sword",Count:1b}} run scoreboard players add @s skPlayer 6
scoreboard players remove @a[tag=daoshaolin,scores={skCDPlayer=1..,skPlayer=0..60}] skPlayer 4
execute as @a[tag=daoshaolin,scores={skCDPlayer=1..,skPlayer=0..65}] if data entity @s {SelectedItem:{id:"minecraft:diamond_sword",Count:1b}} run scoreboard players add @s skRunDistance 50
execute as @a[tag=daoshaolin,scores={skCDPlayer=1..,skPlayer=60..}] if data entity @s {SelectedItem:{id:"minecraft:diamond_sword",Count:1b}} run scoreboard players add @s skRunDistance 200
execute as @a[tag=daoshaolin,scores={skRunDistance=0..}] if data entity @s Inventory[{Slot:100b,id:"minecraft:leather_boots",Count:1b}] run scoreboard players remove @s skRunDistance 20
execute as @a[tag=daoshaolin,scores={skRunDistance=0..}] if data entity @s Inventory[{Slot:100b,id:"minecraft:leather_boots",Count:1b}] run scoreboard players remove @s skRunDistance 20
execute as @a[tag=daoshaolin,scores={skRunDistance=0..}] if data entity @s Inventory[{Slot:100b,id:"minecraft:leather_boots",Count:1b}] run scoreboard players remove @s skRunDistance 30

item replace entity @a[tag=daoshaolin,scores={skSneakTime=1..}] armor.feet with minecraft:leather_boots{AttributeModifiers: [{Operation: 1, Amount: -0.9d, UUID: [I; 568910790, -333307795, -417766810, -1174236752], Slot: feet, AttributeName: "generic.movement_speed", Name: "generic.movementSpeed"}, {Operation: 0, Amount: +3, UUID: [I; 651643252, 639612357, -366610784, 1661125901], Slot: feet, AttributeName: "generic.armor", Name: "generic.armor"}, {Operation: 0, Amount: +2, UUID: [I; 509276324, 1381579940, -325337673, 1174468276], Slot: feet, AttributeName: "generic.armor_toughness", Name: "generic.armorToughness"}], display: {Name: '[{"text":"停息","color":"aqua","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false}]', color: 15532287}, Unbreakable: 1, Enchantments: [{id: "minecraft:blast_protection", lvl: 2}, {id: "minecraft:fire_protection", lvl: 2}, {id: "minecraft:projectile_protection", lvl: 2}, {id: "minecraft:protection", lvl: 1}]} 1
scoreboard players set @a[tag=daoshaolin,scores={skSneakTime=1..}] skSneakTime 0
#被动技能【魔逝】效果
effect give @a[tag=daoshaolin,scores={skCDPlayer=1..,skRunDistance=5001..}] instant_damage 1 0
#清空每秒计时
scoreboard players set @a[tag=daoshaolin,scores={skCDPlayer=1..}] skCDPlayer 0
#20,40,60 分别提速
effect give @a[tag=daoshaolin,scores={skPlayer=20..}] speed 1 1 true
effect give @a[tag=daoshaolin,scores={skPlayer=40..}] speed 1 2 true
effect give @a[tag=daoshaolin,scores={skPlayer=60}] speed 1 3 true
item replace entity @a[tag=daoshaolin,scores={skPlayer=60}] armor.head with minecraft:purple_stained_glass{AttributeModifiers: [{Operation: 0, Amount: +1, UUID: [I; 508358204, -493718983, -380625121, -1920473369], Slot: head, AttributeName: "generic.attack_damage", Name: "generic.attackDamage"}, {Operation: 0, Amount: +0.4d, UUID: [I; 588450321, -1181317974, -425041135, 2005426675], Slot: head, AttributeName: "generic.attack_speed", Name: "generic.attackSpeed"}], display: {Name: '[{"text":"刀意之巅","color":"aqua","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false}]'}} 1


clear @a[tag=daoshaolin,scores={skPlayer=..59}] purple_stained_glass

#被动技能【破戒】
effect clear @a[tag=daoshaolin,scores={skPlayer=15..}] slowness
effect clear @a[tag=daoshaolin,scores={skPlayer=30..}] blindness
effect clear @a[tag=daoshaolin,scores={skPlayer=50..}] levitation
effect clear @a[tag=daoshaolin,scores={skPlayer=60}] levitation
execute at @a[tag=daoshaolin,scores={skPlayer=45..}] run particle dragon_breath ~ ~ ~ 0.2 0.1 0.2 0.05 2 normal @a
execute at @a[tag=daoshaolin,scores={skPlayer=60}] run particle dragon_breath ~ ~ ~ 0.2 0.1 0.2 0.05 2 normal @a

#【刀意&誓言】控制数值
scoreboard players set @a[tag=daoshaolin,scores={skPlayer=61..}] skPlayer 60
scoreboard players set @a[tag=daoshaolin,scores={skPlayer=..-1}] skPlayer 0
scoreboard players set @a[tag=daoshaolin,scores={skRunDistance=..-1}] skRunDistance 0


#被动技能【魔逝】
#走路一格增加100誓言
scoreboard players add @a[tag=daoshaolin,scores={skWalkDistance=200..}] skRunDistance 100
scoreboard players reset @a[tag=daoshaolin,scores={skWalkDistance=200..}] skWalkDistance
#跳跃增加200，并结束冥想
clear @a[tag=daoshaolin,scores={skJump=1..}] leather_boots
scoreboard players add @a[tag=daoshaolin,scores={skJump=1..}] skRunDistance 200
scoreboard players reset @a[tag=daoshaolin,scores={skJump=1..}] skJump
#誓言超过5000死亡时公报
execute as @a[tag=daoshaolin,scores={skRunDistance=5000..},nbt={DeathTime:1s}] run title @s title [{"text":"魔逝","color":"dark_red","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscased":false}]
execute as @a[tag=daoshaolin,scores={skRunDistance=5000..},nbt={DeathTime:1s}] run title @s subtitle [{"text":"你无法控制我","color":"green","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":" —魔逝","color":"black","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false}]
execute as @a[tag=daoshaolin,scores={skRunDistance=5000..},nbt={DeathTime:1s}] run tellraw @a [{"selector":"@s","color":"yellow","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":"意识不清醒，被魔法吞噬了","color":"dark_purple","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":" —孤帆远影意识中的魔鬼","color":"black","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false}]


#被动技能【魔逝】效果
effect give @a[tag=daoshaolin,scores={skRunDistance=5001..}] weakness 1 0 true

#被动技能【幻魔身法】受伤时恢复身体
execute as @a[tag=daoshaolin,scores={daoshaolin2=..2,skShouShang1=30..,skCDPearl=0}] run function nw:yingxiong/3yingxiong/04daoshaolin/skill/huanmoshenfa
scoreboard players reset @a[tag=daoshaolin] skShouShang1
#被动技能【幻魔身法】每3次受到中毒
effect give @a[tag=daoshaolin,scores={daoshaolin2=3..}] poison 3 2 true
scoreboard players set @a[tag=daoshaolin,scores={daoshaolin2=3..}] daoshaolin2 0

#C04孤帆远影（刀少林）
execute as @a[tag=daoshaolin,scores={skRunDistance=0..3500}] run title @s actionbar [{"text":"幻魔身法","color":"dark_red","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":"正在冷却：","color":"gold","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"score":{"objective":"skCDPearl","name":"@s"},"color":"aqua","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":"s","color":"gold","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":" 刀意 ","color":"dark_red","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"score":{"objective":"skPlayer","name":"@s"},"color":"aqua","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":"/","color":"dark_red","bold":true,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":"60","color":"gold","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":" 誓言 ","color":"dark_red","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"score":{"objective":"skRunDistance","name":"@s"},"color":"aqua","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":"/","color":"dark_red","bold":true,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":"5000","color":"gold","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false}]

execute as @a[tag=daoshaolin,scores={skRunDistance=3501..4500}] run title @s actionbar [{"text":"幻魔身法","color":"dark_red","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":"正在冷却：","color":"gold","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"score":{"objective":"skCDPearl","name":"@s"},"color":"aqua","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":"s","color":"gold","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":" 刀意 ","color":"dark_red","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"score":{"objective":"skPlayer","name":"@s"},"color":"aqua","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":"/","color":"dark_red","bold":true,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":"60","color":"gold","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":" 誓言 ","color":"dark_red","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"score":{"objective":"skRunDistance","name":"@s"},"color":"red","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":"/","color":"dark_red","bold":true,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":"5000","color":"gold","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false}]

execute as @a[tag=daoshaolin,scores={skRunDistance=4501..}] run title @s actionbar [{"text":"幻魔身法","color":"dark_red","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":"正在冷却：","color":"gold","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"score":{"objective":"skCDPearl","name":"@s"},"color":"aqua","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":"s","color":"gold","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":" 刀意 ","color":"dark_red","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"score":{"objective":"skPlayer","name":"@s"},"color":"aqua","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":"/","color":"dark_red","bold":true,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":"60","color":"gold","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":" 誓言 ","color":"dark_red","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"score":{"objective":"skRunDistance","name":"@s"},"color":"dark_red","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":"/","color":"dark_red","bold":true,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":"5000","color":"gold","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false}]
